<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\vis\vreturn\api\service\model;

class GetDiffWithVepoByDiffNoResponse {
	
	static $_TSPEC;
	public $detailId = null;
	public $rvDifferenceNo = null;
	public $returnNo = null;
	public $originPo = null;
	public $vePo = null;
	public $itemCode = null;
	public $itemName = null;
	public $boxNo = null;
	public $returnQty = null;
	public $outboundQty = null;
	public $differenceQty = null;
	public $differenceAmount = null;
	public $purchasePrice = null;
	public $isReturn = null;
	public $vendorFeedback = null;
	public $skuImg = null;
	public $vendorNote = null;
	public $createdBy = null;
	public $createTime = null;
	public $updatedBy = null;
	public $updateTime = null;
	public $scheduleId = null;
	public $antiTheftCode = null;
	public $antiTheftCodeUsedBy = null;
	public $orderSn = null;
	public $payQty = null;
	public $orderSnGlobalId = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'detailId'
			),
			2 => array(
			'var' => 'rvDifferenceNo'
			),
			3 => array(
			'var' => 'returnNo'
			),
			4 => array(
			'var' => 'originPo'
			),
			5 => array(
			'var' => 'vePo'
			),
			6 => array(
			'var' => 'itemCode'
			),
			7 => array(
			'var' => 'itemName'
			),
			8 => array(
			'var' => 'boxNo'
			),
			9 => array(
			'var' => 'returnQty'
			),
			10 => array(
			'var' => 'outboundQty'
			),
			11 => array(
			'var' => 'differenceQty'
			),
			12 => array(
			'var' => 'differenceAmount'
			),
			13 => array(
			'var' => 'purchasePrice'
			),
			14 => array(
			'var' => 'isReturn'
			),
			15 => array(
			'var' => 'vendorFeedback'
			),
			16 => array(
			'var' => 'skuImg'
			),
			17 => array(
			'var' => 'vendorNote'
			),
			18 => array(
			'var' => 'createdBy'
			),
			19 => array(
			'var' => 'createTime'
			),
			20 => array(
			'var' => 'updatedBy'
			),
			21 => array(
			'var' => 'updateTime'
			),
			22 => array(
			'var' => 'scheduleId'
			),
			23 => array(
			'var' => 'antiTheftCode'
			),
			24 => array(
			'var' => 'antiTheftCodeUsedBy'
			),
			25 => array(
			'var' => 'orderSn'
			),
			26 => array(
			'var' => 'payQty'
			),
			27 => array(
			'var' => 'orderSnGlobalId'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['detailId'])){
				
				$this->detailId = $vals['detailId'];
			}
			
			
			if (isset($vals['rvDifferenceNo'])){
				
				$this->rvDifferenceNo = $vals['rvDifferenceNo'];
			}
			
			
			if (isset($vals['returnNo'])){
				
				$this->returnNo = $vals['returnNo'];
			}
			
			
			if (isset($vals['originPo'])){
				
				$this->originPo = $vals['originPo'];
			}
			
			
			if (isset($vals['vePo'])){
				
				$this->vePo = $vals['vePo'];
			}
			
			
			if (isset($vals['itemCode'])){
				
				$this->itemCode = $vals['itemCode'];
			}
			
			
			if (isset($vals['itemName'])){
				
				$this->itemName = $vals['itemName'];
			}
			
			
			if (isset($vals['boxNo'])){
				
				$this->boxNo = $vals['boxNo'];
			}
			
			
			if (isset($vals['returnQty'])){
				
				$this->returnQty = $vals['returnQty'];
			}
			
			
			if (isset($vals['outboundQty'])){
				
				$this->outboundQty = $vals['outboundQty'];
			}
			
			
			if (isset($vals['differenceQty'])){
				
				$this->differenceQty = $vals['differenceQty'];
			}
			
			
			if (isset($vals['differenceAmount'])){
				
				$this->differenceAmount = $vals['differenceAmount'];
			}
			
			
			if (isset($vals['purchasePrice'])){
				
				$this->purchasePrice = $vals['purchasePrice'];
			}
			
			
			if (isset($vals['isReturn'])){
				
				$this->isReturn = $vals['isReturn'];
			}
			
			
			if (isset($vals['vendorFeedback'])){
				
				$this->vendorFeedback = $vals['vendorFeedback'];
			}
			
			
			if (isset($vals['skuImg'])){
				
				$this->skuImg = $vals['skuImg'];
			}
			
			
			if (isset($vals['vendorNote'])){
				
				$this->vendorNote = $vals['vendorNote'];
			}
			
			
			if (isset($vals['createdBy'])){
				
				$this->createdBy = $vals['createdBy'];
			}
			
			
			if (isset($vals['createTime'])){
				
				$this->createTime = $vals['createTime'];
			}
			
			
			if (isset($vals['updatedBy'])){
				
				$this->updatedBy = $vals['updatedBy'];
			}
			
			
			if (isset($vals['updateTime'])){
				
				$this->updateTime = $vals['updateTime'];
			}
			
			
			if (isset($vals['scheduleId'])){
				
				$this->scheduleId = $vals['scheduleId'];
			}
			
			
			if (isset($vals['antiTheftCode'])){
				
				$this->antiTheftCode = $vals['antiTheftCode'];
			}
			
			
			if (isset($vals['antiTheftCodeUsedBy'])){
				
				$this->antiTheftCodeUsedBy = $vals['antiTheftCodeUsedBy'];
			}
			
			
			if (isset($vals['orderSn'])){
				
				$this->orderSn = $vals['orderSn'];
			}
			
			
			if (isset($vals['payQty'])){
				
				$this->payQty = $vals['payQty'];
			}
			
			
			if (isset($vals['orderSnGlobalId'])){
				
				$this->orderSnGlobalId = $vals['orderSnGlobalId'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'GetDiffWithVepoByDiffNoResponse';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("detailId" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->detailId); 
				
			}
			
			
			
			
			if ("rvDifferenceNo" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->rvDifferenceNo);
				
			}
			
			
			
			
			if ("returnNo" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->returnNo);
				
			}
			
			
			
			
			if ("originPo" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->originPo);
				
			}
			
			
			
			
			if ("vePo" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->vePo);
				
			}
			
			
			
			
			if ("itemCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->itemCode);
				
			}
			
			
			
			
			if ("itemName" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->itemName);
				
			}
			
			
			
			
			if ("boxNo" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->boxNo);
				
			}
			
			
			
			
			if ("returnQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->returnQty); 
				
			}
			
			
			
			
			if ("outboundQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->outboundQty); 
				
			}
			
			
			
			
			if ("differenceQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->differenceQty); 
				
			}
			
			
			
			
			if ("differenceAmount" == $schemeField){
				
				$needSkip = false;
				$input->readDouble($this->differenceAmount);
				
			}
			
			
			
			
			if ("purchasePrice" == $schemeField){
				
				$needSkip = false;
				$input->readDouble($this->purchasePrice);
				
			}
			
			
			
			
			if ("isReturn" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->isReturn); 
				
			}
			
			
			
			
			if ("vendorFeedback" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->vendorFeedback); 
				
			}
			
			
			
			
			if ("skuImg" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->skuImg);
				
			}
			
			
			
			
			if ("vendorNote" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->vendorNote);
				
			}
			
			
			
			
			if ("createdBy" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->createdBy);
				
			}
			
			
			
			
			if ("createTime" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->createTime); 
				
			}
			
			
			
			
			if ("updatedBy" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->updatedBy);
				
			}
			
			
			
			
			if ("updateTime" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->updateTime); 
				
			}
			
			
			
			
			if ("scheduleId" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->scheduleId);
				
			}
			
			
			
			
			if ("antiTheftCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->antiTheftCode);
				
			}
			
			
			
			
			if ("antiTheftCodeUsedBy" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->antiTheftCodeUsedBy);
				
			}
			
			
			
			
			if ("orderSn" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->orderSn);
				
			}
			
			
			
			
			if ("payQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->payQty); 
				
			}
			
			
			
			
			if ("orderSnGlobalId" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->orderSnGlobalId); 
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		if($this->detailId !== null) {
			
			$xfer += $output->writeFieldBegin('detailId');
			$xfer += $output->writeI64($this->detailId);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->rvDifferenceNo !== null) {
			
			$xfer += $output->writeFieldBegin('rvDifferenceNo');
			$xfer += $output->writeString($this->rvDifferenceNo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->returnNo !== null) {
			
			$xfer += $output->writeFieldBegin('returnNo');
			$xfer += $output->writeString($this->returnNo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->originPo !== null) {
			
			$xfer += $output->writeFieldBegin('originPo');
			$xfer += $output->writeString($this->originPo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->vePo !== null) {
			
			$xfer += $output->writeFieldBegin('vePo');
			$xfer += $output->writeString($this->vePo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->itemCode !== null) {
			
			$xfer += $output->writeFieldBegin('itemCode');
			$xfer += $output->writeString($this->itemCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->itemName !== null) {
			
			$xfer += $output->writeFieldBegin('itemName');
			$xfer += $output->writeString($this->itemName);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->boxNo !== null) {
			
			$xfer += $output->writeFieldBegin('boxNo');
			$xfer += $output->writeString($this->boxNo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->returnQty !== null) {
			
			$xfer += $output->writeFieldBegin('returnQty');
			$xfer += $output->writeI32($this->returnQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->outboundQty !== null) {
			
			$xfer += $output->writeFieldBegin('outboundQty');
			$xfer += $output->writeI32($this->outboundQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->differenceQty !== null) {
			
			$xfer += $output->writeFieldBegin('differenceQty');
			$xfer += $output->writeI32($this->differenceQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->differenceAmount !== null) {
			
			$xfer += $output->writeFieldBegin('differenceAmount');
			$xfer += $output->writeDouble($this->differenceAmount);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->purchasePrice !== null) {
			
			$xfer += $output->writeFieldBegin('purchasePrice');
			$xfer += $output->writeDouble($this->purchasePrice);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->isReturn !== null) {
			
			$xfer += $output->writeFieldBegin('isReturn');
			$xfer += $output->writeI32($this->isReturn);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->vendorFeedback !== null) {
			
			$xfer += $output->writeFieldBegin('vendorFeedback');
			$xfer += $output->writeI32($this->vendorFeedback);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->skuImg !== null) {
			
			$xfer += $output->writeFieldBegin('skuImg');
			$xfer += $output->writeString($this->skuImg);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->vendorNote !== null) {
			
			$xfer += $output->writeFieldBegin('vendorNote');
			$xfer += $output->writeString($this->vendorNote);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->createdBy !== null) {
			
			$xfer += $output->writeFieldBegin('createdBy');
			$xfer += $output->writeString($this->createdBy);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->createTime !== null) {
			
			$xfer += $output->writeFieldBegin('createTime');
			$xfer += $output->writeI64($this->createTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->updatedBy !== null) {
			
			$xfer += $output->writeFieldBegin('updatedBy');
			$xfer += $output->writeString($this->updatedBy);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->updateTime !== null) {
			
			$xfer += $output->writeFieldBegin('updateTime');
			$xfer += $output->writeI64($this->updateTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->scheduleId !== null) {
			
			$xfer += $output->writeFieldBegin('scheduleId');
			$xfer += $output->writeString($this->scheduleId);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->antiTheftCode !== null) {
			
			$xfer += $output->writeFieldBegin('antiTheftCode');
			$xfer += $output->writeString($this->antiTheftCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->antiTheftCodeUsedBy !== null) {
			
			$xfer += $output->writeFieldBegin('antiTheftCodeUsedBy');
			$xfer += $output->writeString($this->antiTheftCodeUsedBy);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->orderSn !== null) {
			
			$xfer += $output->writeFieldBegin('orderSn');
			$xfer += $output->writeString($this->orderSn);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->payQty !== null) {
			
			$xfer += $output->writeFieldBegin('payQty');
			$xfer += $output->writeI32($this->payQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->orderSnGlobalId !== null) {
			
			$xfer += $output->writeFieldBegin('orderSnGlobalId');
			$xfer += $output->writeI64($this->orderSnGlobalId);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>